// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/*!
 * @file Time.h
 * This header file contains the declaration of the described types in the IDL file.
 *
 * This file was generated by the tool fastddsgen.
 */

#ifndef _FAST_DDS_GENERATED_TIME_H_
#define _FAST_DDS_GENERATED_TIME_H_

#include <array>
#include <bitset>
#include <cstdint>
#include <map>
#include <string>
#include <vector>

#include <fastcdr/cdr/fixed_size_string.hpp>
#include <fastcdr/xcdr/external.hpp>
#include <fastcdr/xcdr/optional.hpp>



#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#define eProsima_user_DllExport __declspec( dllexport )
#else
#define eProsima_user_DllExport
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define eProsima_user_DllExport
#endif  // _WIN32

#if defined(_WIN32)
#if defined(EPROSIMA_USER_DLL_EXPORT)
#if defined(TIME_SOURCE)
#define TIME_DllAPI __declspec( dllexport )
#else
#define TIME_DllAPI __declspec( dllimport )
#endif // TIME_SOURCE
#else
#define TIME_DllAPI
#endif  // EPROSIMA_USER_DLL_EXPORT
#else
#define TIME_DllAPI
#endif // _WIN32

namespace eprosima {
namespace fastcdr {
class Cdr;
class CdrSizeCalculator;
} // namespace fastcdr
} // namespace eprosima





/*!
 * @brief This class represents the structure Time defined by the user in the IDL file.
 * @ingroup Time
 */
class Time
{
public:

    /*!
     * @brief Default constructor.
     */
    eProsima_user_DllExport Time();

    /*!
     * @brief Default destructor.
     */
    eProsima_user_DllExport ~Time();

    /*!
     * @brief Copy constructor.
     * @param x Reference to the object Time that will be copied.
     */
    eProsima_user_DllExport Time(
            const Time& x);

    /*!
     * @brief Move constructor.
     * @param x Reference to the object Time that will be copied.
     */
    eProsima_user_DllExport Time(
            Time&& x) noexcept;

    /*!
     * @brief Copy assignment.
     * @param x Reference to the object Time that will be copied.
     */
    eProsima_user_DllExport Time& operator =(
            const Time& x);

    /*!
     * @brief Move assignment.
     * @param x Reference to the object Time that will be copied.
     */
    eProsima_user_DllExport Time& operator =(
            Time&& x) noexcept;

    /*!
     * @brief Comparison operator.
     * @param x Time object to compare.
     */
    eProsima_user_DllExport bool operator ==(
            const Time& x) const;

    /*!
     * @brief Comparison operator.
     * @param x Time object to compare.
     */
    eProsima_user_DllExport bool operator !=(
            const Time& x) const;

    /*!
     * @brief This function sets a value in member seconds
     * @param _seconds New value for member seconds
     */
    eProsima_user_DllExport void seconds(
            int32_t _seconds);

    /*!
     * @brief This function returns the value of member seconds
     * @return Value of member seconds
     */
    eProsima_user_DllExport int32_t seconds() const;

    /*!
     * @brief This function returns a reference to member seconds
     * @return Reference to member seconds
     */
    eProsima_user_DllExport int32_t& seconds();


    /*!
     * @brief This function sets a value in member nanoseconds
     * @param _nanoseconds New value for member nanoseconds
     */
    eProsima_user_DllExport void nanoseconds(
            int32_t _nanoseconds);

    /*!
     * @brief This function returns the value of member nanoseconds
     * @return Value of member nanoseconds
     */
    eProsima_user_DllExport int32_t nanoseconds() const;

    /*!
     * @brief This function returns a reference to member nanoseconds
     * @return Reference to member nanoseconds
     */
    eProsima_user_DllExport int32_t& nanoseconds();

private:

    int32_t m_seconds{0};
    int32_t m_nanoseconds{0};

};

#endif // _FAST_DDS_GENERATED_TIME_H_



